import { Controller, Get, Post, Body, Patch, Param, Delete, UseGuards } from '@nestjs/common';
import { TDeviceService } from './t-device.service';
import { CreateTDeviceDto } from './dto/t-device.dto';
import { UpdateTDeviceDto } from './dto/t-device.dto';
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';

@Controller('api/t-device')
// @UseGuards(JwtAuthGuard)
export class TDeviceController {
  constructor(private readonly tDeviceService: TDeviceService) {}

  @Post()
  create(@Body() createTDeviceDto: CreateTDeviceDto) {
    return this.tDeviceService.create(createTDeviceDto);
  }

  @Get()
  findAll() {
    return this.tDeviceService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.tDeviceService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateTDeviceDto: UpdateTDeviceDto) {
    return this.tDeviceService.update(+id, updateTDeviceDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.tDeviceService.remove(+id);
  }
} 